import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
Vue.use(Vuex)

const store = new Vuex.Store({
  strict: process.env.NODE_ENV !== 'production',
  state: {
    metaData: {

    },
    testStatus: 'init'
  },
  getters: {
    currentTestStatus(state) {
      return 'CurrentTestStatus: ' + state.testStatus
    }
  },
  mutations: {
    changeTestStatus(state, payload) {
      state.testStatus = "multi change test"
      state.testStatus = payload
    }
  },
  actions: {
    callChangeTestStatus({ commit }, payload) {
      commit('changeTestStatus', payload)
    }
  },
  modules: {
    user
  }
})

export default store